]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dnd: If needed, destroy _dragActor in _cancelDrag
authorMaxim Ermilov <zaspire@rambler.ru>
Sun, 30 Jan 2011 23:04:56 +0000 (02:04 +0300)
committerOwen W. Taylor <otaylor@fishsoup.net>
Mon, 21 Mar 2011 21:39:42 +0000 (17:39 -0400)
In the case where the original actor is destroyed, we don't
show a snap back animation, so we need to destroy drag actor
as we would do in _onAnimationComplete.

https://bugzilla.gnome.org/show_bug.cgi?id=640781

js/ui/dnd.js

index 46d32fdd3ed315095115266bfbca4c25404e9d48..46440d6ffe4a8d6379707713203ff1897450a6bc 100644 (file)
@@ -507,6 +507,9 @@ _Draggable.prototype = {
             if (!this._buttonDown)
                 this._dragComplete();
             this.emit('drag-end', eventTime, false);
+            if (!this._dragOrigParent)
+                this._dragActor.destroy();
+
             return;
         }